package com.example.qxfw.dlqx.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.zy.PowerLoadHour;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@DS("service")
public interface PowerLoadHourMapper extends BaseMapper<PowerLoadHour> {

    @Select("select load, datechar + interval '1 day' as datechar " +
            "from powerload_hour " +
            "where datechar between '${dateChar1}' and '${dateChar2}' " +
            "order by datechar")
    List<PowerLoadHour> selectByDateChar(String dateChar1, String dateChar2);
}
